/*
 * Copyright 2012 the original author or authors.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * 
 */
package org.chacha.entity;

import java.util.HashMap;
import java.util.Map;

/**
 *  命令基类，在此定义命令格式为命令头+命令体,opt+body
 *	@author: hejing
 *	@date: 2012-11-26-上午10:09:35
 */
public class Request {
	protected String opt;		//命令号
	protected Map body=new HashMap();	//命令体，保存命令参数及值，<key,value>格式
	
	public String getOpt() {
		return opt;
	}
	public void setOpt(String opt) {
		this.opt = opt;
	}
	public Map getBody() {
		return body;
	}
	public void setBody(Map body) {
		this.body = body;
	}
	public Object get(String key){
		return body.get(key);
	}
	public void put(String key,Object value){
		body.put(key, value);
	}
}
